<template>
	<view class="search_container" :style="{'background-color': bgColor}">
		<view class="search_box" @click="searchBoxHandler"  :style="{'border-radius': radius + 'px'}">
			<uni-icons class="search_icons" type="search" size="17"></uni-icons>
			<view class="search_placeholder">搜索</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"my-search",
		props: {
			bgColor: {
				type: String,
				default: '#c00000',
			},
			radius: {
				type: Number,
				default: 18
			},
			
		},
		data() {
			return {
				
			};
		},
		methods: {
			searchBoxHandler() {
				this.$emit('searchHandler', );
			},
		},
	}
</script>

<style lang="scss">
.search_container {
	display: flex;
	align-items: center;
	padding: 0 10px;
	height: 50px;
	.search_box {
		height: 36px;
		width: 100%;
		display: flex;
		justify-content: start;
		align-items: center;
		background-color: #fff;
		.search_icons {
			margin-left: 30rpx;
		}
		.search_placeholder {
			color: #ccc;
		}
	}
}
</style>